<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    //定义一个函数实现向页面上输出表格
    //表格的行数和列数作为参数输入
    //完成函数调用
    var borderwidth = 1;
    var tablewidth = 400;
    var tableheight = 400;
    function createTable(a, b){
        document.write("<table border = '"+borderwidth+"' width = '"+tableheight+"'height = '"+tableheight+"'>");
        for(var i = 0; i < a; i++){
            document.write("<tr>");
            for(var j = 0; j < b; j++){
                document.write("<td>");
                document.write("&nbsp;&nbsp;")
                document.write("</td>");
            }
            document.write("</tr>");
        }
        document.write("</table>");
        return true;
    }
    var result = createTable(10, 10);
    console.log(result);
</script>
</html>